package com.liu.thread.ch10;

public class Singleton {
	
	private Singleton (){}
	private static Singleton instance=null;
	public static Singleton getInstance(){
		if(instance==null){
			try {
				Thread.sleep(100);
			} catch (InterruptedException e) {
				e.printStackTrace();
			}
			instance=new Singleton();
		}
		return instance;
		
	}

}
